// 职责：负责对文章的各种服务器的请求

import request from '@/utils/request'

export const getArticleList = ({current,pageSize}) => {
  return request.get('/admin/interview/query', {
    params: {
        current,
        pageSize
    }
  })
}

// 新增面经
export const createArticle = data => {
  return request.post('/admin/interview/create', data)
}

// 根据id获取老数据
export const getArticleDetail = id => {
  return request.get('/admin/interview/show', {
    params: {
      id
    }
  })
}

// 实现数据修改
export const updateArticle = data => {
  return request.put('/admin/interview/update', data)
}

// 删除
export const removeArticle = id => {
  return request.delete('/admin/interview/remove', {
    data: {
      id
    }
  })
}